<template>
	<div>
		<!-- 顶部选项卡 -->
		<scroll-view class="pagecontrol-top-scroll" scroll-x="true" scroll-with-animation
			:scroll-into-view="scrollInto">
			<view class="pagecontrol-top-title">
				<view v-for="(items, index) in itemsArr" :key="index" class="pagecontrol-top-text"
					@click="changeTab(index)" :id="'tab' + index">
					<view :class="tabIndex === index ? 'pagecontrol-top-selected' : 'pagecontrol-top-normal'">
						{{items}}</view>
					<view class="pagecontrol-bottom-line"
						:class="tabIndex === index ? 'pagecontrol-bottom-line-show' : 'pagecontrol-bottom-line-visibility'">
					</view>
				</view>
				<view v-if="openMore" @click="openToggle" hover-class="buttonHover"
					style="display: flex;justify-content: center;color: #eb884c;padding-top: 4px;background-color: #eeeeee;height: 26px;width: 62px;">
					更多<uni-icons type="bottom" size="14"></uni-icons>
				</view>
				<view v-else @click="closeToggle" hover-class="buttonHover"
					style="display: flex;justify-content: center;color: #eb884c;padding-top: 4px;background-color: #eeeeee;height: 26px;width: 62px;">
					更多<uni-icons type="top" size="14"></uni-icons>
				</view>
			</view>

		</scroll-view>
		<!-- 内容 -->
		<swiper :duration="150" :current="tabIndex" @change="onChangeTab" :style="'height:' + scrollH + 'px;'">
			<swiper-item v-for="(item_, index_) in itemsArr" :key="index_">
				<scroll-view scroll-y="true" show :style="'height:' + scrollH + 'px;'">
					<view v-if="index_==0" style="padding-bottom: 130px;">
						<!--运单信息-->
						<view style="margin: 10px;background-color: #ffffff;border-radius: 20px 20px 0;">
							<view
								style="border-bottom: 0.5px solid rgb(237, 237, 237);display: flex;align-items: center;justify-content: space-between;">
								<view class="contract"
									style="background-color: #d9d9d9;width: 180px;height: 30px;border-radius: 20px 0 0;font-weight: bold;display: flex;justify-content: center;align-items: center;">
									<uni-tooltip>
										<template slot="default">
											<text style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;width: 150px;text-align: center;word-break: break-all;">
												{{formData.outCode}}
											</text>
										</template>
										<template slot="content" style="display: flex;">
											{{formData.outCode}}
											<text @click="copy(formData.outCode)" class="copy" style="width: 25px;">复制</text>
										</template>
									</uni-tooltip>
								</view>
								<span style="display: flex;">
									<view
										style="margin-left: 20px;border: 1rpx solid #bf5f09;color:#bf5f09;border-radius: 8px;font-size: 12px;padding: 0px 5px;display: flex;justify-content: center;align-items: center;">
										{{waybillType[formData.waybillType]}}
									</view>
									<!-- <view
										style="margin-left: 10px;border: 1rpx solid #bf5f09;color:#bf5f09;border-radius: 8px;font-size: 12px;padding: 0px 5px;display: flex;justify-content: center;align-items: center;">
										中转
									</view> -->
								</span>
								<text style="color: #eb884c;margin-right: 5px;">{{status[formData.status]}}</text>
							</view>
						</view>
						<!--收发货方-->
						<view
							style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;display: flex;flex-direction: row;">
							<view style="width: 50px;display: flex;flex-direction: column;margin-top: 20px;">
								<view
									style="height: 24px;width: 24px;border-radius: 50%;background-color: #464646;color: #ffffff;display: flex;justify-content: center;align-items: center;">
									寄</view>
								<view
									style="height: 126px;width: 1px;border-left: 1rpx dashed #bf6006;margin-left: 11px;">
								</view>
								<view
									style="height: 24px;width: 24px;border-radius: 50%;background-color: #bf6006;color: #ffffff;display: flex;justify-content: center;align-items: center;">
									收</view>
							</view>
							<view style="display: flex;flex-direction: column;width: 100%;">
								<view style="display: flex;width: 100%;height: 130px;">
									<!--发货方-->
									<view style="display: flex;flex-direction: column;width: 100%;">
										<text>{{formData.shipName}}</text>
										<span>
											<text style="font-size: 16px;font-weight: bold;">{{formData.shipContacts}}</text>
											<text style="margin-left: 10px;">{{formData.shipContactTel}}</text>
										</span>
										<span style="font-size: 12px;color: #6f6f6f;">
											{{formData.shipDistrictName}}{{formData.shipAddress}}
										</span>
										<span>
											<text style="font-weight: bold;">发货网点：{{formData.shipNetId}}</text>
											<text style="color: #6f6f6f;">({{formData.shipNetName}})</text>
										</span>

									</view>
								</view>
								<!--分割线-->
								<view
									style="height: 1px;width: 100%;display: flex;justify-content: center;background-color: #e7e7e7;margin: 10px 0;">
								</view>

								<view style="display: flex;width: 100%;height: 130px;">
									<!--收货方-->
									<view style="display: flex;flex-direction: column;width: 100%;">
										<text>{{formData.deliveryName}}</text>
										<span>
											<text style="font-size: 16px;font-weight: bold;">{{formData.deliveryContacts}}</text>
											<text style="margin-left: 10px;">{{formData.deliveryContactTel}}</text>
										</span>
										<span style="font-size: 12px;color: #6f6f6f;">
											{{formData.deliveryDistrictName}}{{formData.deliveryAddress}}
										</span>
										<span>
											<text style="font-weight: bold;">收货网点：{{formData.deliveryNetId}}</text>
											<text style="color: #6f6f6f;">({{formData.deliveryNetName}})</text>
										</span>

									</view>
								</view>
							</view>

						</view>
						<!--物品信息-->
						<view style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<text style="font-weight: bold;">物品信息</text>
							<view v-for="(item2,index2) in formData.goodSourceList" :key="index2" style="display: flex;flex-direction: column;">
								<view
									style="display: flex;justify-content: space-between;margin-top: 10px;font-size: 12px;">
									<text style="background-color: #f6f6f6;padding: 2px;border-radius: 4px;">{{item2.goodsName}}</text>
									<text style="background-color: #f6f6f6;padding: 2px;border-radius: 4px;">{{goodsType[item2.goodsType]}}</text>
									<text style="background-color: #f6f6f6;padding: 2px;border-radius: 4px;">{{packingType[item2.packingType]}}</text>
									<text style="background-color: #feecd9;padding: 2px;border-radius: 4px;">{{item2.num}}件 {{item2.weight}}吨 {{item2.bulk}}立方米</text>
									<!-- <text style="background-color: #f6f6f6;padding: 2px;border-radius: 4px;">按重量</text> -->
									<!-- <text
										style="background-color: #f6f6f6;padding: 2px;border-radius: 4px;">3500元</text> -->
								</view>
							</view>
							<!-- <view style="margin-top: 10px;">			
								<myfilepicker  @clickFile="clickFile"  readonly limit="3"  :value="fileList[index]" file-extname="pdf,png,gif,jpg,jpeg,doc,docx" file-mediatype="all"></myfilepicker>
							</view> -->
						</view>
						<!--发货网点信息-->
						<view style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<view
								style="display: flex;flex-direction: column;width: 100%;font-size: 12px;color: #6f6f6f;">
								<view style="display: flex;justify-content: space-between;">
									<text>发货网点【发车】</text>
									<text>计划发货时间：{{formData.shipPlanTime}}</text>
								</view>
								<view style="display: flex;justify-content: space-between;">
									<text>上门提货</text>
									<text>预约时间：{{formData.shipPlanTime}}</text>
								</view>
								<view style="display: flex;justify-content: space-between;">
									<text>收货地址【到达】</text>
									<text>计划到达时间：{{formData.deliveryPlanTime}}</text>
								</view>
								<view style="display: flex;justify-content: space-between;">
									<text>送货上门</text>
									<text>预计时间：{{formData.deliveryAppointmentTime}}</text>
								</view>
							</view>
						</view>
						<!--相关服务-->
						<view  style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<text style="font-weight: bold;">相关服务</text>
							<view v-if="formData.waybillValueAdd"
								style="display: flex;flex-wrap: wrap;margin: 0 auto;width: 100%;color: #6f6f6f;font-size: 12px;">
								<view  v-if="formData.goodSourceList.packingService=='1'"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">包装服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.loadingFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">装货服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.unloadFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">卸装服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.parcelInsuranceFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">保险投保</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.drayage)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">短驳服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.carryFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">搬运服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.receiptFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">回单服务</text>
									</view>
								</view>
								<view  v-if="Number(formData.waybillValueAdd.agentBusinessFee)>0"
									style="height: 30px;display: flex;justify-content: center;align-items: center;margin: 8px;">
									<view style="display: flex;align-items: center;">
										<span
											style="border: 1px solid #bf5f09;width: 14px;height: 14px;border-radius: 4px;display: flex;justify-content: center;align-items: center;">
											<uni-icons type="checkmarkempty" size="14" color="#bf5f09"></uni-icons>
										</span>
										<text style="margin-left: 2px;">代收贷款</text>
									</view>
								</view>
							</view>
						</view>
						<!--费用信息-->
						<view style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<text style="font-weight: bold;">费用信息</text>
							<view
								style="display: flex;flex-direction: column;width: 100%;color: #6f6f6f;margin: 8px;font-size: 12px;">
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>总运费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.totalCarriageFee?formData.totalCarriageFee:0)}}</text>
									</span>
									<span style="display: flex;width: 50%;">
										<text>总包装费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.totalPackingFee?formData.totalPackingFee:0)}}</text>
									</span>
								</view>
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>提货费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.shipPickUpFee?formData.shipPickUpFee:0)}}</text>
									</span>
									<span style="display: flex;width: 50%;">
										<text>送货费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.deliveryPickUpFee?formData.deliveryPickUpFee:0)}}</text>
									</span>
								</view>
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>短驳费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.drayage:0)}}</text>
									</span>
									<span style="display: flex;width: 50%;">
										<text>回单费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.receiptFee:0)}}</text>
									</span>
									<!-- <span style="display: flex;width: 50%;">
										<text>安装费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.installationFee:0)}}</text>
									</span> -->
								</view>
								<!-- <view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>加工费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.processFee:0)}}</text>
									</span>
								</view> -->
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>仓储费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.warehouseFee:0)}}</text>
									</span>
									<span style="display: flex;width: 50%;">
										<text>装货费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.loadingFee:0)}}</text>
									</span>
								</view>
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>卸货费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.unloadFee:0)}}</text>
									</span>
									<!-- <span style="display: flex;width: 50%;">
										<text>搬运费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.carryFee:0)}}</text>
									</span> -->
									<span style="display: flex;width: 50%;">
										<text>保价费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.parcelInsuranceFee:0)}}</text>
									</span>
								</view>
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>其他费用</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.otherFee:0)}}</text>
									</span>
								</view>
							</view>
							<!--分割线-->
							<view
								style="height: 1px;width: 100%;display: flex;justify-content: center;background-color: #e7e7e7;margin: 10px 0;">
							</view>
							<view style="display: flex;">
								<span style="color: #6f6f6f;margin-left: 8px;">
									<text>总费总计：</text>
									<text  style="margin-left: 10px;">￥{{totalPrice}}</text>
								</span>
							</view>
						</view>
						<!--代收贷款信息-->
						<view v-if="formData.waybillValueAdd.agentFlag!='0'||!formData.waybillValueAdd.agentFlag" style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<text style="font-weight: bold;">代收贷款信息</text>
							<view
								style="display: flex;flex-direction: column;width: 100%;color: #6f6f6f;margin: 8px;font-size: 12px;">
								<view style="display: flex;">
									<text>代收账号：</text>
									<text style="margin-left: 10px;">{{formData.waybillValueAdd?formData.waybillValueAdd.agentBusinessAccount:'无'}}</text>
								</view>
								<view style="display: flex;">
									<text>代收账号户名：</text>
									<text style="margin-left: 10px;">{{formData.waybillValueAdd?formData.waybillValueAdd.agentBusinessAccountName:'无'}}</text>
								</view>
								<view style="display: flex;">
									<span style="display: flex;width: 50%;">
										<text>代收费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.agentBusinessFee:0)}}</text>
									</span>
									<span style="display: flex;width: 50%;">
										<text>代收服务费</text>
										<text style="margin-left: 10px;">￥{{Number(formData.waybillValueAdd?formData.waybillValueAdd.agentBusinessServiceFee:0)}}</text>
									</span>
								</view>
							</view>
						</view>
						<!--其它信息-->
						<view style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
							<text style="font-weight: bold;">其他信息</text>
							<view
								style="display: flex;flex-direction: column;width: 100%;color: #6f6f6f;margin: 8px;font-size: 12px;">
								<view style="display: flex;">
									<text style="flex: 1;">结算方式：</text>
									<text style="flex: 3;" v-if="formData.waybillFee.settlementMode=='1'">现付{{formData.waybillFee.cod}}元</text>
									<text style="flex: 3;" v-else-if="formData.waybillFee.settlementMode=='2'" >到付{{formData.waybillFee.pod}}元</text>
									<text style="flex: 3;" v-else-if="formData.waybillFee.settlementMode=='3'" >欠付{{formData.waybillFee.poa}}元</text>
									<text style="flex: 3;" v-else-if="formData.waybillFee.settlementMode=='4'" >回单付{{formData.waybillFee.pom}}元</text>
									<text style="flex: 3;" v-else-if="formData.waybillFee.settlementMode=='5'" >月结{{formData.waybillFee.ms}}元</text>
									<text style="flex: 3;" v-else-if="formData.waybillFee.settlementMode=='7'" >混合付</text>
								</view>
								<view style="display: flex;">
									<text style="flex: 1;">建单人：</text>
									<span style="flex: 3;">
										<text>{{formData.createBy}}</text>
									</span>
								</view>
								<view style="display: flex;">
									<text style="flex: 1;">创建时间：</text>
									<text style="flex: 3;">{{formData.createTime}}</text>
								</view>
								<view style="display: flex;">
									<text style="flex: 1;">备注：</text>
									<text style="flex: 3;">{{formData.remark}}</text>
								</view>
							</view>
						</view>
						<!--底部按钮组-->
						<!--提货&调度-->
						<!--待调度(110)-->
						<view v-if="formData.status==110"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view v-if="formData.scheduleStatus=='0'||formData.scheduleStatus=='440'"
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view @click="cancelWayBillProfile" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消运单</view>
							</view>
							<view
								:style="{'display': 'flex','align-items': 'center','width':'50%','height': '60px','justify-content': 'center'}">
								<view  @click="completeDispatch" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									车辆调度</view>
							</view>
						</view>
						<!--待提货(111)-->
						<view v-else-if="formData.status==111"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view  @click="completePick" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									开始提货</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view @click="cancelDispatch" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消调度</view>
							</view>
						</view>
						<!--提货&调度&装车-->
						<!--(提货完成)待装车(120)-->
						<!--待装车(未调度)-->
						<!-- <view v-else-if="formData.status==120&&(formData.scheduleStatus=='0'||formData.scheduleStatus=='440')"
							style="background-color: #ffffff;z-index: 1;height: 120px;width:100%;position: fixed;bottom: 0;display: flex;flex-direction: column;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 100%;height: 60px;justify-content: space-evenly;">
								<view  @click="cancelWayBillProfile" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消运单</view>
								<view @click="canclePick" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消提货</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 100%;justify-content: space-evenly;">
								<view  @click="completeDispatch" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									车辆调度</view>
								<view @click="truckLoading" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									装车</view>
							</view>
						</view> -->
						<!--待装车(已经调度)-->
						<!-- <view v-else-if="formData.status==120&&!(formData.scheduleStatus=='0'||formData.scheduleStatus=='440')"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view @click="canclePick" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消提货</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view v-if="formData.scheduleStatus=='0'||formData.scheduleStatus=='440'" @click="completeDispatch" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									车辆调度</view>
								<view v-else @click="cancelDispatch" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消调度</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view @click="truckLoading" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									装车</view>
							</view>
						</view> -->
						<!--取消装车&发车-->
						<!--待发车(120)-->
						<view v-else-if="formData.status==120"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<!-- <view @click="cancleTruckLoading" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消装车</view> -->
								<view @click="canclePick" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消提货</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view @click="depart" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									发车</view>
							</view>
						</view>
						<!--取消发车&到达-->
						<!--(已发车)在途中(140)-->
						<view v-else-if="formData.status==140"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view @click="cancleDepart" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消发车</view>
								<!-- <view  @click="dispatch" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									发车</view> -->
							</view>
							<view
								style="display: flex;align-items: center;width: 50%;height: 60px;justify-content: center;">
								<view @click="arrive" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									到达</view>
							</view>
						</view>
						<!--取消发车&到达-->
						<!--中转(160)-->
						<view v-else-if="formData.status==160"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view  @click="depart" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									发车</view>
								<!-- <view @click="cancleDispatch" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 110px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消发车</view> -->
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view @click="unload" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									卸车</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view @click="cancleArrive" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消到达</view>
									
								<!-- <view @click="arrive" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									到达</view> -->
							</view>
						</view>
						<!--取消发车&到达-->
						<!--短驳(170)-->
						<view v-else-if="formData.status==170"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view  @click="depart" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									发车</view>
								<!-- <view @click="cancleDispatch" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 110px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消发车</view> -->
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view @click="unload" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									卸车</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 33%;height: 60px;justify-content: center;">
								<view @click="cancleArrive" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消到达</view>
									
								<!-- <view @click="arrive" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									到达</view> -->
							</view>
						</view>
						<!--取消到达&配送-->
						<!--到达(180)-->
						<view v-else-if="formData.status==180"
							style="background-color: #ffffff;z-index: 1;height: 120px;width:100%;position: fixed;bottom: 0;display: flex;flex-direction: column;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 100%;height: 60px;justify-content: space-evenly;">
								<view @click="cancleArrive" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消到达</view>
								<view @click="signIn" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									签收</view>
							</view>
							<view
								style="display: flex;align-items: center;width: 100%;justify-content: space-evenly;">
								<!-- <view @click="agency" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									代收贷款</view> -->
								<view v-if="formData.unLoadId=='0'" @click="unload" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									卸车</view>
								<view v-else @click="cancelUnload" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消卸车</view>
									
								<view  @click="uploadReceipt" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									<!-- <span v-if="formData.receiptAttachments==null||formData.receiptAttachments==''">上传回单</span>
									<span v-else>重新上传</span> -->
									确认上传
								</view>
								<!-- <view @click="salesReturn" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									退货</view> -->
							</view>
						</view>
						<!--取消到达&配送-->
						<!--签收(200)-->
						<view v-else-if="formData.status==200"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;flex-direction: column;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 100%;height: 60px;justify-content: center;">
								<view @click="cancelSignIn" hover-class="buttonHover"
									style="height: 30px;border:1px solid #bf5f09;color: #bf5f09;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									取消签收</view>
								<view  @click="uploadReceipt" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									确认上传
								</view>
								<view @click="completeWaybill" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									完成运单</view>
							</view>
							<!-- <view
								style="display: flex;align-items: center;width: 100%;justify-content: space-evenly;">
								<view @click="agency" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									代收贷款</view>
								<view  @click="uploadReceipt" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									确认上传
								</view>
								<view @click="salesReturn" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									退货</view>
							</view> -->
						</view>
						<!--退货-->
						<!--完成(230)-->
						<!-- <view v-else-if="formData.status==230"
							style="background-color: #ffffff;z-index: 1;height: 70px;width:100%;position: fixed;bottom: 0;display: flex;box-shadow: 0px 0px 11px rgba(0, 0, 0, 0.1);">
							<view
								style="display: flex;align-items: center;width: 100%;height: 60px;justify-content: center;">
								<view @click="salesReturn" hover-class="buttonHover"
									style="height: 30px;background-color: #bf5f09;color: #ffffff;width: 85px;display: flex;justify-content: center;align-items: center;border-radius: 4px;">
									退货</view>
							</view>
						</view> -->
					</view>
					<!-- <view v-else-if="index_==1">

					</view> -->
					<view v-else-if="index_==1">
						<!--车辆调度-->
						<view v-if="formData.scheduleStatus!='0'&&formData.scheduleStatus!='440'">
							<!--车次信息-->
							<view style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
								<view>发车批次：{{formData.scheduleNo}}<text @click="copy(formData.scheduleNo)" class="copy">复制</text></view>
								<view>{{formData.scheduleVo.driverVo.driverName}}/{{formData.scheduleVo.driverVo.phoneNumber}}
								</view>
								<view>车牌号：{{formData.scheduleVo.carVo.licensePlate}}</view>
								<view style="display: flex;">
									<text
										style="background-color: #6699ff;color: #ffffff;padding: 2px 5px;border-radius: 6px;">{{headType[formData.scheduleVo.carVo.headType]}}</text>
									<text
										style="background-color: #00cc99;color: #ffffff;padding: 2px 5px;border-radius: 6px;margin-left: 5px;">{{carType_[formData.scheduleVo.carVo.carType]}}{{formData.scheduleVo.carVo.carLength}}米</text>
									<text
										style="background-color: #0099ff;color: #ffffff;padding: 2px 5px;border-radius: 6px;margin-left: 5px;">{{formData.scheduleVo.carVo.loadCapacity}}吨{{formData.scheduleVo.carVo.volume}}立方米</text>
								</view>
								<!-- <text>车辆定位:</text> -->
								<view>
									运输线路：
									<!-- <text v-for="(item__,index__) in formData.scheduleVo.lineVo.stationList"
										:key="index__">{{item__.branchDept.deptName}}→</text> -->
									<text>{{formData.scheduleVo.lineVo.lineName}}</text>
								</view>
							</view>
						</view>
						<view v-else>
							<image src="../../../static/none.png" style="height: 260px;width: 260px;display: block;margin: 0 auto;padding-top: 50px;"></image>
							<view style="display: flex;justify-content: center;align-items: center;">
								暂无调度信息
							</view>
						</view>
						
					</view>
				</scroll-view>
			</swiper-item>
		</swiper>
		<!-- 顶部操作弹窗 -->
		<uni-popup ref="popup" background-color="#fff" @maskClick="closeToggle">
			<view style="margin-top: 40px;border-radius: 20px;">
				<view style="display: flex;flex-wrap: wrap;margin: 0 auto;width: 100%;">
					<view v-for="(item,index) in moreItemArr" :key="index">
						<view @click="clickMoreItem(index)"
							style="width: 75px;height: 30px;display: flex;justify-content: center;align-items: center;margin: 10px;">
							<view :class="{'active':(index+3)==tabIndex}">
								{{item}}
							</view>
						</view>
					</view>
				</view>
			</view>
		</uni-popup>
		<!-- 完成提货弹窗 -->
		<uni-popup ref="completePickDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="完成提货" title="完成提货运单"
				@confirm="completePickDialogConfirm" :before-close="true" @close="closeDialog('completePickDialog')">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 120px;">
					<!-- <uni-forms ref="form_pickup" :modelValue="formData_pickup" :rules="rules_pickup" labelWidth="75px">
						<uni-forms-item label="提货人" name="pickupName" required>
							<uni-easyinput type="text" v-model="formData_pickup.pickupName" placeholder="请输入提货人" />
						</uni-forms-item>
						<uni-forms-item label="联系电话" name="contactPhone" required>
							<uni-easyinput type="number" v-model="formData_pickup.contactPhone" placeholder="请输入联系电话" />
						</uni-forms-item>
						<uni-forms-item label="提货费" name="amount">
							<uni-easyinput type="text" v-model="formData_pickup.amount" placeholder="请输入提货费" />
						</uni-forms-item>
						<uni-forms-item label="车牌号" name="plateNumber" required>
							<uni-combox  :candidates="plateNumber" placeholder="请输入车牌号"
								v-model="formData_pickup.plateNumber"></uni-combox>
						</uni-forms-item>
						<uni-forms-item label="计费方式" name="feeMode">
							<uni-data-select v-model="formData_pickup.feeMode" :localdata="feeMode"
								style="background-color: white;" />
						</uni-forms-item>
						<uni-forms-item label="备注">
							<uni-easyinput type="textarea" v-model="formData_pickup.remark" placeholder="提货相关备注说明" />
						</uni-forms-item>
					</uni-forms>
					<view style="height: 50px;"></view> -->
					<view style="display: flex;flex-direction: column;width: 100%;">
						<view style="display: flex;">
							<text style="width: 75px;">发车批次：</text>
							<text style="font-weight: bold;margin-left: 20px;">{{formData.scheduleVo.scheduleNo}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">承运方：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.carrierVo?formData.scheduleVo.carrierVo.carrierName:'无'}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">车型：</text>
							<text style="margin-left: 20px;">{{carType_[formData.scheduleVo.carVo.carType]}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">车牌号：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.carVo.licensePlate}}</text>
						</view>
						<!-- <view style="display: flex;">
							<text style="width: 75px;">车辆定位：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.scheduleNo}}</text>
						</view> -->
						<view style="display: flex;">
							<text style="width: 75px;">司机：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.driverVo.driverName}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">司机电话：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.driverVo.phoneNumber}}</text>
						</view>
						<view style="height: 50px;"></view>
					</view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 取消提货提示窗 -->
		<uni-popup ref="cancelPickDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认" title="取消提货运单"
				@confirm="cancelPickDialogConfirm">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 160px;">
					<!-- <view style="display: flex;flex-direction: column;width: 100%;">
						<view style="display: flex;">
							<text style="width: 75px;">提货人：</text>
							<text style="font-weight: bold;margin-left: 20px;">{{formData_pickup.pickupName}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">详细电话：</text>
							<text style="margin-left: 20px;">{{formData_pickup.contactPhone}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">计费方式：</text>
							<text style="margin-left: 20px;">{{formData_pickup.feeMode}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">提货费(元)：</text>
							<text style="margin-left: 20px;">{{formData_pickup.amount}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">车牌号：</text>
							<text style="margin-left: 20px;">{{formData_pickup.plateNumber}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">备注：</text>
							<text style="margin-left: 20px;">{{formData_pickup.remark}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">操作人：</text>
							<text style="margin-left: 20px;">{{formData_pickup.createBy}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">操作时间：</text>
							<text style="margin-left: 20px;">{{formData_pickup.updateTime}}</text>
						</view>
						<view style="display: flex;margin-top: 10px;color: #bf5f09;">
							<text>*确认取消当前提货</text>
						</view>
					</view> -->
					<view style="display: flex;flex-direction: column;width: 100%;">
							<view style="display: flex;">
								<text style="width: 75px;">发车批次：</text>
								<text style="font-weight: bold;margin-left: 20px;">{{formData.scheduleVo.scheduleNo}}</text>
							</view>
							<view style="display: flex;">
								<text style="width: 75px;">承运方：</text>
								<text style="margin-left: 20px;">{{formData.scheduleVo.carrierVo?formData.scheduleVo.carrierVo.carrierName:'无'}}</text>
							</view>
							<view style="display: flex;">
								<text style="width: 75px;">车型：</text>
								<text style="margin-left: 20px;">{{carType_[formData.scheduleVo.carVo.carType]}}</text>
							</view>
							<view style="display: flex;">
								<text style="width: 75px;">车牌号：</text>
								<text style="margin-left: 20px;">{{formData.scheduleVo.carVo.licensePlate}}</text>
							</view>
							<!-- <view style="display: flex;">
								<text style="width: 75px;">车辆定位：</text>
								<text style="margin-left: 20px;">{{formData.scheduleVo.scheduleNo}}</text>
							</view> -->
							<view style="display: flex;">
								<text style="width: 75px;">司机：</text>
								<text style="margin-left: 20px;">{{formData.scheduleVo.driverVo.driverName}}</text>
							</view>
							<view style="display: flex;">
								<text style="width: 75px;">司机电话：</text>
								<text style="margin-left: 20px;">{{formData.scheduleVo.driverVo.phoneNumber}}</text>
							</view>
							<view style="display: flex;margin-top: 10px;color: #bf5f09;">
								<text>*确认取消当前提货</text>
							</view>
					</view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 取消调度提示窗 -->
		<uni-popup ref="cancelDispatchDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认" title="取消调度"
				@confirm="cancelDispatchDialogConfirm">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 200px;">
					<view style="display: flex;flex-direction: column;width: 100%;">
						<view style="display: flex;">
							<text style="width: 75px;">发车批次：</text>
							<text style="font-weight: bold;margin-left: 20px;">{{formData.scheduleVo.scheduleNo}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">承运方：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.carrierVo.carrierName}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">车型：</text>
							<text style="margin-left: 20px;">{{carType_[formData.scheduleVo.carVo.carType]}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">车牌号：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.carVo.licensePlate}}</text>
						</view>
						<!-- <view style="display: flex;">
							<text style="width: 75px;">车辆定位：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.scheduleNo}}</text>
						</view> -->
						<view style="display: flex;">
							<text style="width: 75px;">司机：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.driverVo.driverName}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">司机电话：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.driverVo.phoneNumber}}</text>
						</view>
						<view style="display: flex;margin-top: 10px;color: #bf5f09;">
							<text>*确认取消当前运单{{formData.scheduleNo}}调度车次</text>
						</view>
					</view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		
		<!-- 运单装车提示窗 -->
		<uni-popup ref="truckLoadingDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认装车" title="运单装车"
				@confirm="truckLoadingDialogConfirm" :before-close="true" @close="closeDialog('truckLoadingDialog')">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 300px;">
					<view style="display: flex;flex-direction: column;width: 100%;">
						<view style="display: flex;">
							<text style="width: 75px;">发货批次：</text>
							<text style="font-weight: bold;margin-left: 20px;">{{formData.scheduleVo.scheduleNo}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">承运方：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.carrierVo.carrierName}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">车型：</text>
							<text style="margin-left: 20px;">{{carType_[formData.scheduleVo.carVo.carType]}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">车牌号：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.carVo.licensePlate}}</text>
						</view>
						<!-- <view style="display: flex;">
							<text style="width: 75px;">车辆定位：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.scheduleNo}}</text>
						</view> -->
						<view style="display: flex;">
							<text style="width: 75px;">司机：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.driverVo.driverName}}</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">司机电话：</text>
							<text style="margin-left: 20px;">{{formData.scheduleVo.driverVo.phoneNumber}}</text>
						</view>
					</view>
					<uni-forms ref="form_truckLoading" :modelValue="formData_truckLoading" :rules="rules_truckLoading" labelWidth="75px">
						<uni-forms-item label="装货人" name="loadUserName" required>
							<uni-easyinput type="text" v-model="formData_truckLoading.loadUserName" placeholder="请输入装货人" />
						</uni-forms-item>
						<uni-forms-item label="联系电话" name="contactPhone" required>
							<uni-easyinput type="number" v-model="formData_truckLoading.contactPhone" placeholder="请输入联系电话" />
						</uni-forms-item>
						<uni-forms-item label="装货费" name="cost">
							<uni-easyinput type="text" v-model="formData_truckLoading.cost" placeholder="请输入装货费" />
						</uni-forms-item>
						<uni-forms-item label="分摊方式" name="allocationMethod">
							<uni-data-select v-model="formData_truckLoading.allocationMethod" :localdata="allocationMethod"
								style="background-color: white;" />
						</uni-forms-item>
						<uni-forms-item label="备注">
							<uni-easyinput type="textarea" v-model="formData_truckLoading.remark" placeholder="装车相关备注说明" />
						</uni-forms-item>
					</uni-forms>
					<view style="height: 50px;"></view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 取消装车提示窗 -->
		<uni-popup ref="cancelTruckLoadingDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认" title="运单取消装车"
				@confirm="cancelTruckLoadingDialogConfirm">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 100px;">
					<view style="display: flex;flex-direction: column;width: 100%;">
						<!-- <view style="display: flex;">
							<text style="width: 75px;">装货人：</text>
							<text style="font-weight: bold;margin-left: 20px;">Y185655850</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">联系电话：</text>
							<text style="margin-left: 20px;">xxxxx</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">装货费：</text>
							<text style="margin-left: 20px;"></text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">分摊方式：</text>
							<text style="margin-left: 20px;">粤BB46546</text>
						</view>
						<view style="display: flex;">
							<text style="width: 75px;">备注：</text>
							<text style="margin-left: 20px;">xxxxxx</text>
						</view> -->
						<view style="display: flex;margin-top: 10px;color: #bf5f09;">
							<text>*确认取消当前运单{{formData.scheduleNo}}装车</text>
						</view>
					</view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 发车弹窗 -->
		<uni-popup ref="departDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认发车" title="运单发车"
				@confirm="departDialogConfirm">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 300px;">
					<uni-forms ref="form" :modelValue="formData"  labelWidth="75px">
						<uni-forms-item label="发车批次">
							<view style="display: flex;align-items: center;height: 36px;">
								<text style="font-weight: bold;">{{formData.scheduleNo}}</text>
							</view>
						</uni-forms-item>
						<uni-forms-item label="司机姓名">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.driverName}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="联系电话">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.phoneNumber}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="身份证号">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.idCardNo}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="车型">
							<view style="display: flex;align-items: center;height: 36px;">
								{{carType_[formData.scheduleVo.carVo.carType]}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="车牌号">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.carVo.licensePlate}}
							</view>
						</uni-forms-item>
						<!-- <uni-forms-item label="挂车牌号">
							<view style="display: flex;align-items: center;height: 36px;">
								<text style="font-weight: bold;">{{formData.scheduleVo}}</text>
							</view>
						</uni-forms-item> -->
						<uni-forms-item label="发车时间" >
							<view style="display: flex;align-items: center;height: 36px;">
								{{getNowTime}}
							</view>
						</uni-forms-item>
						<!-- <uni-forms-item label="相关资料">
							<view style="display: flex;align-items: center;height: 36px;">
								<text style="font-weight: bold;">{{formData.scheduleVo}}</text>
							</view>
						</uni-forms-item> -->
						<view style="height: 50px;"></view>
					</uni-forms>
					<!-- <uni-forms ref="form" :modelValue="formData_depart"  :rules="rules_depart" labelWidth="75px">
						<uni-forms-item label="发车批次">
							<view style="display: flex;align-items: center;height: 36px;">
								<text style="font-weight: bold;">{{formData.scheduleNo}}</text>
							</view>
						</uni-forms-item>
						<uni-forms-item label="司机姓名" required>
							<uni-easyinput type="text" v-model="formData_depart.name" placeholder="请输入司机姓名" />
						</uni-forms-item>
						<uni-forms-item label="联系电话" required>
							<uni-easyinput type="number" v-model="formData_depart.tel" placeholder="请输入联系电话" />
						</uni-forms-item>
						<uni-forms-item label="身份证号" required>
							<uni-easyinput type="text" v-model="formData_depart.idCard" placeholder="请输入身份证号" />
						</uni-forms-item>
						<uni-forms-item label="车型" required>
							<uni-data-select v-model="formData_depart.carType" :localdata="carType"
								style="background-color: white;" />
						</uni-forms-item>
						<uni-forms-item label="车牌号" required>
							<uni-easyinput type="text" v-model="formData_depart.carNumber" placeholder="请输入车牌号" />
						</uni-forms-item>
						<uni-forms-item label="挂车牌号">
							<uni-easyinput type="text" v-model="formData_depart.hangCarNumber" placeholder="请输入车牌号" />
						</uni-forms-item>
						<uni-forms-item label="发车时间" >
							<uni-datetime-picker type="date" v-model="formData_depart.departTime" />
						</uni-forms-item>
						<uni-forms-item label="相关资料">
							<uni-file-picker limit="1" disable-preview :imageStyles="imageStyles" style="background-color: white;"
												file-mediatype="image"><uni-icons type="cloud-upload" size="18"></uni-icons>驾驶证</uni-file-picker>
							
							<view style="margin-top: 10px;">
								<uni-file-picker limit="2" disable-preview :imageStyles="imageStyles" style="background-color: white;"
													file-mediatype="image"><uni-icons type="cloud-upload" size="18"></uni-icons>行驶证(2张)</uni-file-picker>
							</view>
							
							<view style="margin-top: 10px;">
								<uni-file-picker limit="3" disable-preview :imageStyles="imageStyles" style="background-color: white;"
													file-mediatype="image"><uni-icons type="cloud-upload" size="18"></uni-icons>人、车头</uni-file-picker>
							</view>
						    <view style="margin-top: 10px;">
						    	<uni-file-picker limit="2" disable-preview :imageStyles="imageStyles" style="background-color: white;"
						    						file-mediatype="image"><uni-icons type="cloud-upload" size="18"></uni-icons>身份证(正反2张)</uni-file-picker>
						    </view>
							
						</uni-forms-item>
						<view style="height: 50px;"></view>
					</uni-forms> -->
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 取消发车弹窗 -->
		<uni-popup ref="cancelDepartDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认" title="运单取消发车"
				@confirm="cancelDepartDialogConfirm">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 300px;">
					<uni-forms ref="form" :modelValue="formData"  labelWidth="75px">
						<uni-forms-item label="发车批次">
							<view style="display: flex;align-items: center;height: 36px;">
								<text style="font-weight: bold;">{{formData.scheduleNo}}</text>
							</view>
						</uni-forms-item>
						<uni-forms-item label="司机姓名">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.driverName}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="联系电话">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.phoneNumber}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="身份证号">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.idCardNo}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="车型">
							<view style="display: flex;align-items: center;height: 36px;">
								{{carType_[formData.scheduleVo.carVo.carType]}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="车牌号">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.carVo.licensePlate}}
							</view>
						</uni-forms-item>
					</uni-forms>
					<view style="display: flex;margin-top: 10px;color: #bf5f09;">
						<text>*确认取消当前运单{{formData.scheduleNo}}发车</text>
					</view>
					<view style="height: 50px;"></view>
					</uni-forms>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 到达提示窗 -->
		<uni-popup ref="arriveDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认到达" title="运单到达"
				@confirm="arriveDialogConfirm" :before-close="true" @close="closeDialog('arriveDialog')">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 300px;">
					<uni-forms ref="form" :modelValue="formData"  labelWidth="75px">
						<uni-forms-item label="运行线路">
							<view style="display: flex;align-items: center;height: 36px;">
								<text style="font-weight: bold;">{{formData.scheduleVo.lineVo.lineName}}:</text>
							</view>
							<!-- <view style="margin-top: 10px;">
								<text v-for="(item,index) in formData.scheduleVo.lineVo.stationList" :key="index">{{item.branchDept.deptName}}→</text>
							</view> -->
						</uni-forms-item>
						<uni-forms-item label="发车批次">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleNo}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="车型">
							<view style="display: flex;align-items: center;height: 36px;">
								{{carType_[formData.scheduleVo.carVo.carType]}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="车牌号">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.carVo.licensePlate}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="司机姓名">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.driverName}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="联系电话">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.phoneNumber}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="身份证号">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.idCardNo}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="到达地址">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.deliveryDistrictName}}{{formData.deliveryAddress}}
							</view>
						</uni-forms-item>
					</uni-forms>
					<view style="height: 50px;"></view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 取消到达提示窗 -->
		<uni-popup ref="cancelArriveDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认" title="运单取消到达"
				@confirm="cancelArriveDialogConfirm">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 200px;">
					<uni-forms ref="form" :modelValue="formData"  labelWidth="75px">
						<uni-forms-item label="运行线路">
							<view style="display: flex;align-items: center;height: 36px;">
								<text style="font-weight: bold;">{{formData.scheduleVo.lineVo.lineName}}:</text>
							</view>
							<!-- <view style="margin-top: 10px;">
								<text v-for="(item,index) in formData.scheduleVo.lineVo.stationList" :key="index">{{item.branchDept.deptName}}→</text>
							</view> -->
						</uni-forms-item>
						<uni-forms-item label="发车批次">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleNo}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="车型">
							<view style="display: flex;align-items: center;height: 36px;">
								{{carType_[formData.scheduleVo.carVo.carType]}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="车牌号">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.carVo.licensePlate}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="司机姓名">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.driverName}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="联系电话">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.phoneNumber}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="身份证号">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.scheduleVo.driverVo.idCardNo}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="到达地址">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData.deliveryDistrictName}}{{formData.deliveryAddress}}
							</view>
						</uni-forms-item>
						<view style="display: flex;margin-top: 10px;color: #bf5f09;">
							<text>*确认取消当前运单{{formData.scheduleNo}}送达</text>
						</view>
					</uni-forms>
					<view style="height: 50px;"></view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 运单卸车提示窗 -->
		<uni-popup ref="unloadDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认卸车" title="运单卸车"
				@confirm="unloadDialogConfirm">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 300px;">
					<uni-forms ref="form_truckLoading" :modelValue="formData_truckLoading" :rules="rules_truckLoading" labelWidth="75px">
						<uni-forms-item label="卸货人" name="loadUserName" required>
							<uni-easyinput type="text" v-model="formData_truckLoading.loadUserName" placeholder="请输入卸货人" />
						</uni-forms-item>
						<uni-forms-item label="联系电话" name="contactPhone" required>
							<uni-easyinput type="number" v-model="formData_truckLoading.contactPhone" placeholder="请输入联系电话" />
						</uni-forms-item>
						<uni-forms-item label="卸货费" name="cost">
							<uni-easyinput type="text" v-model="formData_truckLoading.cost" placeholder="请输入卸货费" />
						</uni-forms-item>
						<uni-forms-item label="分摊方式" name="allocationMethod">
							<uni-data-select v-model="formData_truckLoading.allocationMethod" :localdata="allocationMethod"
								style="background-color: white;" />
						</uni-forms-item>
						<uni-forms-item label="备注">
							<uni-easyinput type="textarea" v-model="formData_truckLoading.remark" placeholder="卸货相关备注说明" />
						</uni-forms-item>
					</uni-forms>
					<view style="height: 50px;"></view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 取消卸车提示窗 -->
		<uni-popup ref="cancelUnloadDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认" title="取消运单卸车"
				@confirm="cancelUnloadDialogConfirm">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 100px;">
					<view style="display: flex;flex-direction: column;width: 100%;">
						<view style="display: flex;margin-top: 10px;color: #bf5f09;">
							<text>*确认取消当前运单{{formData.scheduleNo}}卸车</text>
						</view>
					</view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 运单上传回单提示窗 -->
		<uni-popup ref="uploadReceiptDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认上传" :title="formData.receiptAttachments?'重新上传':'上传回单'"
				@confirm="uploadReceiptDialogConfirm" :before-close="true" @close="closeDialog('uploadReceiptDialog')">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 300px;">
					<uni-forms ref="form" :modelValue="formData"  labelWidth="75px">
						<uni-forms-item label="相关资料">
							<!-- <myfilepicker  @clickFile="clickFile_receiptAttachments" limit="3" :imageStyles="imageStyles"  :value="fileList_receiptAttachments" file-extname="png,jpg,jpeg" file-mediatype="image" @select="selectFile_receiptAttachments"  @delete='deleteFile_receiptAttachments' @success="success_receiptAttachments" @fail="fail_receiptAttachments"
								title="*点击上传回单，支持常规图片、PDF、DOC、XLS格式，最多可上传3个附件*"><uni-icons type="cloud-upload" size="18"></uni-icons>回单照片</myfilepicker> -->
							<myfilepicker :limit="'3'" :imageStyles="imageStyles" :fileIdString="formData.receiptAttachments" :fileExtname="'png,jpg,jpeg'" :fileMediatype="'image'"  @transFileIdString="getFileIdString_receiptAttachments"
									:title="'*点击上传回单，支持png/jpg/jpeg，最多可上传3个附件*'"><uni-icons type="cloud-upload" size="18"></uni-icons>回单照片</myfilepicker>
						</uni-forms-item>
					</uni-forms>
					<view style="height: 50px;"></view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 签收提示窗 -->
		<uni-popup ref="signDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认签收" title="运单签收"
				@confirm="signDialogConfirm" :before-close="true" @close="closeDialog('signDialog')">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 300px;">
					<uni-forms ref="form_sign" :modelValue="formData_sign" :rules="rules_sign" labelWidth="75px">
						<uni-forms-item label="签收人" name="signer" required>
							<uni-easyinput type="text" v-model="formData_sign.signer" placeholder="请输入签收人" />
						</uni-forms-item>
						<uni-forms-item label="联系电话" name="signedPhone" required>
							<uni-easyinput type="number" v-model="formData_sign.signedPhone" placeholder="请输入联系电话" />
						</uni-forms-item>
						<uni-forms-item label="身份证号" name="signedIdcard" required>
							<uni-easyinput type="text" v-model="formData_sign.signedIdcard" placeholder="请输入身份证号" />
						</uni-forms-item>
						<uni-forms-item label="代理签收" name="signedAgentFlag">
							<view style="display: flex;">
								<checkbox-group style="padding-top: 8px;" @change="checkboxChange">
									<label>
										<checkbox value="1" :checked="formData_sign.signedAgentFlag=='1'" />
									</label>
								</checkbox-group>
							</view>
						</uni-forms-item>
						<uni-forms-item label="签收类型" name="signedType" required>
							<uni-data-select v-model="formData_sign.signedType" :localdata="signedType"
								style="background-color: white;" />
						</uni-forms-item>
						<uni-forms-item label="签收时间" name="updateTime" required>
							<uni-datetime-picker type="datetime" v-model="formData_sign.updateTime" />
						</uni-forms-item>
						<uni-forms-item label="回单附件">
							<!-- <myfilepicker  @clickFile="clickFile_signedAttach" limit="3" :imageStyles="imageStyles"  :value="fileList_signedAttach" file-extname="png,jpg,jpeg" file-mediatype="image" @select="selectFile_signedAttach"  @delete='deleteFile_signedAttach' @success="success_signedAttach" @fail="fail_signedAttach"
								title="*点击上传回单，支持常规图片、PDF、DOC、XLS格式，最多可上传3个附件*"><uni-icons type="cloud-upload" size="18"></uni-icons>回单照片</myfilepicker> -->
							<myfilepicker :limit="'3'" :imageStyles="imageStyles" :fileIdString="formData_sign.signedAttach" :fileExtname="'png,jpg,jpeg'" :fileMediatype="'image'"  @transFileIdString="getFileIdString_signedAttach"
									:title="'*点击上传回单，支持png/jpg/jpeg，最多可上传3个附件*'"><uni-icons type="cloud-upload" size="18"></uni-icons>回单照片</myfilepicker>
						</uni-forms-item>
						<uni-forms-item label="备注">
							<uni-easyinput type="textarea" v-model="formData_sign.signedRemark" placeholder="签收相关备注说明" />
						</uni-forms-item>
					</uni-forms>
					<view style="height: 50px;"></view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 取消签收提示窗 -->
		<uni-popup ref="cancelSignDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认" title="取消签收"
				@confirm="cancelSignDialogConfirm">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 300px;">
					<uni-forms ref="form_sign" :modelValue="formData_sign" :rules="rules_sign" labelWidth="75px">
						<uni-forms-item label="签收人" name="signer" required>
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData_sign.signer}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="联系电话" name="signedPhone" required>
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData_sign.signedPhone}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="身份证号" name="signedIdcard" required>
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData_sign.signedIdcard}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="代理签收" name="signedAgentFlag">
							<view style="display: flex;">
								<checkbox-group style="padding-top: 8px;">
									<label>
										<checkbox value="1" disabled :checked="formData_sign.signedAgentFlag=='1'" />
									</label>
								</checkbox-group>
							</view>
						</uni-forms-item>
						<uni-forms-item label="签收类型" name="signedType" required>
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData_sign.signedType}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="签收时间" name="updateTime" required>
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData_sign.updateTime}}
							</view>
						</uni-forms-item>
						<uni-forms-item label="回单附件">
							<!-- <myfilepicker :del-icon="false" readonly  limit="3" :imageStyles="imageStyles"  :value="fileList_signedAttach" file-extname="png,jpg,jpeg" file-mediatype="image" 
								title="*点击上传回单，支持常规图片、PDF、DOC、XLS格式，最多可上传3个附件*"><uni-icons type="cloud-upload" size="18"></uni-icons>回单照片</myfilepicker> -->
							<myfilepicker :limit="'3'" :readonly="true" :imageStyles="imageStyles" :fileIdString="formData_sign.signedAttach" :fileExtname="'png,jpg,jpeg'" :fileMediatype="'image'"></myfilepicker>
						</uni-forms-item>
						<uni-forms-item label="备注">
							<view style="display: flex;align-items: center;height: 36px;">
								{{formData_sign.signedRemark}}
							</view>
						</uni-forms-item>
					</uni-forms>
					<view style="height: 50px;"></view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
		<!-- 完成运单提示窗 -->
		<uni-popup ref="completeWaybillDialog" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" confirmText="确认完成" title="完成运单"
				@confirm="completeWaybillDialogConfirm">
				<scroll-view scroll-top="0" scroll-y="true" style="height: 100px;">
					<view style="display: flex;margin-top: 10px;color: #bf5f09;">
						<text>*确认完成当前运单{{formData.scheduleNo}}*</text>
					</view>
				</scroll-view>
			</uni-popup-dialog>
		</uni-popup>
	</div>
</template>

<script>
	import {
		getWayBillDetails,
		updateWayBillPickup,
		putWayBillStatus,
		putScheduleStatus,
		waybillTruckLoading,
		cancelWaybillTruckLoading,
		waybillDepart,
		cancelWaybillDepart,
		waybillArrive,
		cancelWaybillArrive,
		uploadReceipt,
		signWaybill,
		deleteSignWaybill,
		completeWaybill
	} from '@/api/system/waybill.js'
	import {updateWayBillStatus} from '@/api/system/return.js';
	
	import {getCarrierCarList} from '@/api/system/driver.js'
	
	import {getDicts} from '@/api/system/dict.js'
	
	import myfilepicker from '@/components/uploadFile/uploadFile.vue'
	export default {
		components: {
			myfilepicker,
		},
		data() {
			return {
				itemsArr: ['运单信息', '车辆调度'],
				moreItemArr: [ '回单跟踪',  '运单评价', '运单日志',  '签收信息'],
				tabIndex: 0,
				scrollH: 700,
				scrollInto: '',
				openMore: true,
				formData:{
					waybillValueAdd:{
						agentFlag:''
					}
				},
				//提货
				formData_pickup: {
					pickupName:'',
					contactPhone:'',
					amount:'',
					plateNumber:'',
					feeMode:'',
					remark:'',
					
					flowStatus:'',
					waybillId:''
				},
				// 校验规则->提货
				rules_pickup: {
					pickupName: {
						rules: [{
							required: true,
							errorMessage: '请输入提货人',
						}]
					},
					contactPhone: {
						rules: [{
							required: true,
							errorMessage: '请输入联系电话',
						},
						{
						    pattern: '^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$',
						    errorMessage: '电话格式不正确'
						}
						]
					},
					plateNumber: {
						rules: [{
							required: true,
							errorMessage: '请输入车牌号',
						}]
					}
				},
				//装车
				formData_truckLoading:{
					loadUserName:'',
					contactPhone:'',
					cost:'',
					allocationMethod:'',
					remark:''
				},
				// 校验规则->装车
				rules_truckLoading: {
					loadUserName: {
						rules: [{
							required: true,
							errorMessage: '请输入装货人',
						}]
					},
					contactPhone: {
						rules: [{
							required: true,
							errorMessage: '请输入联系电话',
						},
						{
						    pattern: '^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$',
						    errorMessage: '电话格式不正确'
						}
						]
					}
				},
				//签收
				formData_sign:{
					signer:'',
					signedPhone:'',
					signedIdcard:'',
					signedAgentFlag:'',
					signedType:'1',
					updateTime:'',
					signedAttach:'',
					signedRemark:'',
					waybillId:''
				},
				// 校验规则->签收
				rules_sign: {
					signer: {
						rules: [{
							required: true,
							errorMessage: '请输入签收人',
						}]
					},
					signedPhone: {
						rules: [{
							required: true,
							errorMessage: '请输入联系电话',
						},
						{
						    pattern: '^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$',
						    errorMessage: '电话格式不正确'
						}
						]
					},
					signedIdcard: {
						rules: [{
							required: true,
							errorMessage: '请输入身份证号',
						},
						{
						    pattern: '(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{2}$)',
						    errorMessage: "请输入正确的身份证号"
						}
						]
					},
					signedType: {
						rules: [{
							required: true,
							errorMessage: '请选择签收类型',
						}]
					},
					updateTime:{
						rules: [{
							required: true,
							errorMessage: '请选择签收时间',
						}]
					},
				},
				//下拉框 ->签收类型
				signedType:[],
				//下拉框->分摊方式
				allocationMethod:[],
				
				//下拉框 ->所属客户
				type: [],
				formData_depart: {
					name: '',
					tel: '',
					idCard: '',
					carType: '',
					carNumber:'',
					hangCarNumber:'',
					departTime:''
				},
				//发车时间
				getNowTime:'',
				// 校验规则->发车
				rules_depart: {
					loadUserName: {
						rules: [{
							required: true,
							errorMessage: '请输入装货人',
						}]
					},
					contactPhone: {
						rules: [{
							required: true,
							errorMessage: '请输入联系电话',
						},
						{
						    pattern: '^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$',
						    errorMessage: '电话格式不正确'
						}
						]
					},
					cost: {
						rules: [{
							required: true,
							errorMessage: '请输入装货费',
						}]
					},
					allocationMethod: {
						rules: [{
							required: true,
							errorMessage: '请选择分摊方式',
						}]
					}
				},
				//车头
				headType: [],
				//下拉框 ->车型
				carType: [],
				//
				carType_:[],
				imageStyles: {
					width: '100%',
					height: 150,
					border: {
						radius: '4px'
					}
				},
				
				//运单类型
				waybillType:[],
				//运单状态
				status:[],
				//货物类型
				goodsType:[],
				//包装类型
				packingType:[],
				//下拉框->车牌号
				plateNumber:[],
				//计费方式->下拉框
				feeMode:[],

				waybillId:'',
			}
		},
		onLoad(e) {
			uni.getSystemInfo({
				success: res => {
					this.scrollH = res.windowHeight - 40;
				}
			});
			
			if (e.returnWaybillId) {
				uni.showLoading({
					title: '正在加载',
				})
				this.waybillId=e.returnWaybillId
				//获取运单详情
				getWayBillDetails(e.returnWaybillId).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						this.formData = res.data
						this.formData_pickup=res.data.pickupVo||{}
						
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}
				})
			}
		},
		created() {
			//加载运单类型
			getDicts('waybill_type').then(res=>{
				res.data.forEach(item=>{
					this.waybillType[item.dictValue]=item.dictLabel
				})
			})
			//加载运单状态
			getDicts('waybill_status').then(res=>{
				res.data.forEach(item=>{
					this.status[item.dictValue]=item.dictLabel
				})
			})
			//加载货物类型
			getDicts('goods_type').then(res=>{
				res.data.forEach(item=>{
					this.goodsType[item.dictValue]=item.dictLabel
				})
			})
			//加载包装类型
			getDicts('packing_type').then(res=>{
				res.data.forEach(item=>{
					this.packingType[item.dictValue]=item.dictLabel
				})
			})
			//加载计费方式
			getDicts('price_method').then(res=>{
				this.feeMode=res.data.map(item=>{
					return {
						value:item.dictValue,
						text:item.dictLabel
					}
				})
			})
			//车型
			getDicts('car_type').then(res=>{
				this.carType=res.data.map(item=>{
					return {
						value:item.dictValue,
						text:item.dictLabel
					}
				})
				res.data.forEach(item=>{
					this.carType_[item.dictValue]=item.dictLabel
				})
			})
			//下拉框->分摊方式
			getDicts('allocation_method').then(res=>{
				this.allocationMethod=res.data.map(item=>{
					return {
						value:item.dictValue,
						text:item.dictLabel
					}
				})
			})
			//加载车头状态
			getDicts('head_type').then(res => {
				res.data.forEach(item => {
					this.headType[item.dictValue] = item.dictLabel
				})
			})
		},
		computed: {
			totalPrice() {
				let totalCarriageFee=Number(this.formData.totalCarriageFee||0)  //总运费
				let totalPackingFee=Number(this.formData.totalPackingFee||0)    //总包装费
				let shipPickUpFee=Number(this.formData.shipPickUpFee||0)        //提货费
				let deliveryPickUpFee=Number(this.formData.deliveryPickUpFee||0) //送货费
				if(!this.formData.waybillValueAdd)
				{
					let totalMoney=totalCarriageFee+totalPackingFee+shipPickUpFee+deliveryPickUpFee;
					return totalMoney.toFixed(2);
				}
				else
				{
					let receiptFee=Number(this.formData.waybillValueAdd.receiptFee||0) //回单费
					let warehouseFee=Number(this.formData.waybillValueAdd.warehouseFee||0)  //仓储费
					let loadingFee=Number(this.formData.waybillValueAdd.loadingFee||0)   //装货费
					let unloadFee=Number(this.formData.waybillValueAdd.unloadFee||0)   //卸货费
					let drayage=Number(this.formData.waybillValueAdd.drayage||0)      //短驳费
					let parcelInsuranceFee=Number(this.formData.waybillValueAdd.parcelInsuranceFee||0)	//保价费
					let otherFee=Number(this.formData.waybillValueAdd.otherFee||0)	//其他费用
					let totalMoney=totalCarriageFee+totalPackingFee+shipPickUpFee+deliveryPickUpFee+receiptFee+warehouseFee+loadingFee+unloadFee+drayage+parcelInsuranceFee+otherFee;
					return totalMoney.toFixed(2);
				}
			}
		},
		methods: {
			async init(){
				//获取运单详情
				await getWayBillDetails(this.waybillId).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						this.formData = res.data
						this.formData_pickup=res.data.pickupVo||{}
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}	
				})
			},
			//接受提交后跳转的顶部导航栏位置
			otherFun() {
				this.init()
			},
			//接收文件传递的id字符串集合
			getFileIdString_receiptAttachments(fileIds){
				this.formData.receiptAttachments=fileIds
			},
			//接收文件传递的id字符串集合
			getFileIdString_signedAttach(fileIds){
				this.formData_sign.signedAttach=fileIds
			},
			// 切换选项
			changeTab(index) {
				if (this.tabIndex === index) {
					return;
				}
				this.tabIndex = index;
				// 滚动到指定元素
				this.scrollInto = 'tab' + index;
			},
			// 监听滑动
			onChangeTab(e) {
				uni.showLoading({
					title: '正在加载',
				})
				setTimeout(function() {
					uni.hideLoading()
				}, 500);
				this.changeTab(e.detail.current);
			},
			//点击更多
			openToggle() {
				// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
				this.$refs.popup.open('top')
				this.openMore = false
			},
			//关闭更多
			closeToggle() {
				this.$refs.popup.close()
				this.openMore = true
			},
			//点击更多里的子项
			clickMoreItem(index) {
				index += 3;
				this.tabIndex = index
			},
			//取消运单
			cancelWayBillProfile(){
				let that = this
				uni.showModal({
					title: '提示',
					content: '确定取消当前退货运单吗？',
					success: function (res) {
						if (res.confirm) {
							//取消运单
							uni.showLoading({
								title: '正在取消...',
							})
							updateWayBillStatus(100,that.waybillId).then(res => {
								uni.hideLoading()
								if (res.code == '200') {
									uni.showToast({
										title: '取消成功',
										icon: 'none'
									})
									let pages = getCurrentPages(); // 获取当前页面栈的实例，以数组形式按栈的顺序给出，第一个元素为首页，最后一个元素为当前页面。
									let nowPage = pages[pages.length - 1]; //当前页页面实例
									let prevPage = pages[pages.length - 2]; //上一页页面实例
									prevPage.$vm.otherFun('0') // 給上一頁綁定方法otherFun,傳參0（tabIndex：0）
									uni.navigateBack({
										delta: 1 // 可以不傳delta值，默認為1
									})
								} else {
									uni.showToast({
										icon: 'none',
										title: res.msg
									})
								}
										
							})
						}
					}
				});
			},
			//完成提货
			completePick(){
				//获取车牌号下拉框
				getCarrierCarList({pageNum:1,pageSize:1000}).then(res=>{
					this.plateNumber=res.rows.map(item=>{
						return item.licensePlate
					})
				})
				this.$refs.completePickDialog.open()
			},
			//关闭弹窗
			closeDialog(name){
				this.$refs[name].close()
			},
			//确认完成提货
			completePickDialogConfirm() {
				this.$refs.form_pickup.validate().then(res => {
					uni.showLoading({
						title: '正在提货...',
					})
					//提货完成
					this.formData_pickup.waybillId=this.waybillId;
					this.formData_pickup.flowStatus='120';
					updateWayBillPickup(this.formData_pickup).then(res => {
						uni.hideLoading()
						if (res.code == '200') {
							uni.showToast({
								title: '提货成功',
								icon: 'none'
							})
							
							this.$refs.completePickDialog.close()
							this.init()
							//this.$forceUpdate(); //重新加载数据
						} else {
							uni.showToast({
								icon: 'none',
								title: res.msg
							})
						}
					})
				}).catch(err => {
					uni.showToast({
						title: err[0].errorMessage,
						icon: 'none'
					})
				})
			},
			//取消提货
			canclePick(){
				this.$refs.cancelPickDialog.open()
			},
			//确认取消提货
			cancelPickDialogConfirm(){
				uni.showLoading({
					title: '正在取消提货...',
				})
				//取消提货完成
				this.formData_pickup.waybillId=this.waybillId;
				this.formData_pickup.flowStatus='111';
				updateWayBillPickup(this.formData_pickup).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '取消提货成功',
							icon: 'none'
						})
						this.init(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}		
				})
			},
			//车辆调度
			completeDispatch(){
				uni.navigateTo({
					url:'/pages-operation/operation/waybillDetails/carDispatch?waybillIds='+this.waybillId
				})
			},
			//取消调度
			cancelDispatch() {
				this.$refs.cancelDispatchDialog.open()
			},
			//确认取消调度
			cancelDispatchDialogConfirm() {
				uni.showLoading({
					title: '正在取消调度...',
				})
				putScheduleStatus(this.waybillId,440).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '取消调度成功',
							icon: 'none'
						})
						this.init(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}	
				})
			},
			//装车
			truckLoading(){
				if(this.formData.scheduleStatus=='0')
				{
					uni.showToast({
						icon:'none',
						title:'请先完成车辆调度'
					})
					return
				}
				//装车默认装车人、电话为司机和司机电话
				this.formData_truckLoading.loadUserName=this.formData.scheduleVo.dricerVo.driverName;
				this.formData_truckLoading.contactPhone=this.formData.scheduleVo.dricerVo.phoneNumber;
				this.$refs.truckLoadingDialog.open()
			},
			//确认装车
			truckLoadingDialogConfirm(){
				this.$refs.form_truckLoading.validate().then(res => {
					uni.showLoading({
						title: '正在装车...',
					})
					//装车完成
					this.formData_truckLoading.waybillIds=[parseInt(this.waybillId)]; //装车运单ID集合
					this.formData_truckLoading.type=0;  //类型(0装车1卸车)
					waybillTruckLoading(this.formData_truckLoading).then(res => {
						uni.hideLoading()
						if (res.code == '200') {
							uni.showToast({
								title: '装车成功',
								icon: 'none'
							})
							
							this.$refs.truckLoadingDialog.close()
							this.init()
							//this.$forceUpdate(); //重新加载数据
						} else {
							uni.showToast({
								icon: 'none',
								title: res.msg
							})
						}
					})
				}).catch(err => {
					uni.showToast({
						title: err[0].errorMessage,
						icon: 'none'
					})
				})
			},
			//取消装车
			cancleTruckLoading(){
				this.$refs.cancelTruckLoadingDialog.open()
			},
			//确认取消装车
			cancelTruckLoadingDialogConfirm(){
				uni.showLoading({
					title: '正在取消装车...',
				})
				cancelWaybillTruckLoading(0,this.formData.loadId).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '取消装车成功',
							icon: 'none'
						})
						
						this.init()
						//this.$forceUpdate(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}
				})
			},
			//获取当前时间
			getNowDateTime(){
				const date = new Date();
				var year = date.getFullYear();
				var month = date.getMonth()+1;
				var day = date.getDate();
				// var hour = date.getHours()<10?('0'+date.getHours()):date.getHours();
				// var minute = date.getMinutes()<10?('0'+date.getMinutes()):date.getMinutes();
				// var second = date.getSeconds()<10?('0'+date.getSeconds()):date.getSeconds();
				// this.getNowTime=year+'年'+month+'月'+day+'日 '+hour+':'+minute+':'+second;
				var hour = date.getHours()<10?('0'+date.getHours()):date.getHours();
				var minute = date.getMinutes()<10?('0'+date.getMinutes()):date.getMinutes();
				var second = date.getSeconds()<10?('0'+date.getSeconds()):date.getSeconds();
				this.getNowTime=year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second;
			},
			//发车
			depart(){
				this.$refs.departDialog.open()
				this.getNowDateTime()
			},
			//确认发车
			departDialogConfirm(){
				uni.showLoading({
					title: '正在发车...',
				})
				//发车完成
				waybillDepart(this.formData.scheduleNo).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '发车成功',
							icon: 'none'
						})
						
						this.init()
						//this.$forceUpdate(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}	
				})
			},
			//取消发车
			cancleDepart(){
				this.$refs.cancelDepartDialog.open()
			},
			//确认取消发车
			cancelDepartDialogConfirm(){
				uni.showLoading({
					title: '正在取消发车...',
				})
				cancelWaybillDepart(this.formData.scheduleNo).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '取消发车成功',
							icon: 'none'
						})
						
						this.init()
						//this.$forceUpdate(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}
				})
			},
			//到达
			arrive(){
				this.$refs.arriveDialog.open()
			},
			//确认到达
			arriveDialogConfirm(){
				uni.showLoading({
					title: '确认到达...',
				})
				//发车完成
				waybillArrive(this.formData.scheduleNo).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '到达成功',
							icon: 'none'
						})
						this.$refs.arriveDialog.close()
						this.init()
						//this.$forceUpdate(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}	
				})
			},
			//取消到达
			cancleArrive(){
				if(this.formData.unLoadId!='0')
				{
					uni.showToast({
						icon:'none',
						title:'请先取消卸车'
					})
					return
				}
				this.$refs.cancelArriveDialog.open()
			},
			//确认取消到达
			cancelArriveDialogConfirm(){
				uni.showLoading({
					title: '正在取消到达...',
				})
				cancelWaybillArrive(this.formData.scheduleNo).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '取消到达成功',
							icon: 'none'
						})
						
						this.init()
						//this.$forceUpdate(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}
				})
			},
			//签收
			signIn(){
				if(this.formData.unLoadId=='0'){
					uni.showToast({
						icon:'none',
						title:'请先进行卸车操作'
					})
					return
				}
				this.formData_sign={
					signer:'',
					signedPhone:'',
					signedIdcard:'',
					signedAgentFlag:'',
					signedType:'1',
					updateTime:'',
					signedAttach:'',
					signedRemark:'',
					waybillId:''
				}
				this.getNowDateTime()
				//签收时间
				this.formData_sign.updateTime=this.getNowTime;
				//下拉框->签收类型
				getDicts('signed_type').then(res=>{
					this.signedType=res.data.map(item=>{
						return {
							value:item.dictValue,
							text:item.dictLabel
						}
					})
				})
				
				this.$refs.signDialog.open()
			},
			//确认签收
			signDialogConfirm(){
				this.$refs.form_sign.validate().then(res => {
					uni.showLoading({
						title: '正在签收...',
					})
					
					//文件 (签收回单)
					if(this.formData_sign.signedAttach===null)
					{
						uni.showToast({
							icon:'none',
							title:'请至少上传1份回单'
						})
						return
					}
					
					this.formData_sign.signedStatus='1'; //待签收	
					this.formData_sign.waybillId=this.waybillId
					//签收完成
					signWaybill(this.formData_sign).then(res => {
						uni.hideLoading()
						if (res.code == '200') {
							uni.showToast({
								title: '签收成功',
								icon: 'none'
							})
							this.$refs.signDialog.close()
							this.init()
							//this.$forceUpdate(); //重新加载数据
						} else {
							uni.showToast({
								icon: 'none',
								title: res.msg
							})
						}	
					})
				}).catch(err => {
					uni.showToast({
						title: err[0].errorMessage,
						icon: 'none'
					})
				})
			},
			//取消签收
			cancelSignIn(){
				this.formData_sign=this.formData.signVo
				this.$refs.cancelSignDialog.open()
			},
			//确认取消签收
			cancelSignDialogConfirm(){
				uni.showLoading({
					title: '正在取消签收...',
				})
				deleteSignWaybill(this.formData.signVo.signedId).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '取消签收成功',
							icon: 'none'
						})
						this.init()
						//this.$forceUpdate(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}	
				})
			},
			//代理签收
			checkboxChange(e){
				if(e.detail.value.length!==0)
				{
					this.formData_sign.signedAgentFlag='1';  //代理
				}
				else
				{
					this.formData_sign.signedAgentFlag='0';  //默认值
				}
			},
			//卸车
			unload(){
				//装车默认装车人、电话为司机和司机电话
				this.formData_truckLoading.loadUserName=this.formData.scheduleVo.driverVo.driverName
				this.formData_truckLoading.contactPhone=this.formData.scheduleVo.driverVo.phoneNumber
				this.$refs.unloadDialog.open()
			},
			//确认卸车
			unloadDialogConfirm(){
				uni.showLoading({
					title: '正在卸车...',
				})
				//卸车完成
				this.formData_truckLoading.waybillIds=[parseInt(this.waybillId)]; //装车运单ID集合
				this.formData_truckLoading.type=1;  //类型(0装车1卸车)
				waybillTruckLoading(this.formData_truckLoading).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '卸车成功',
							icon: 'none'
						})
						
						this.init()
						//this.$forceUpdate(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}
				})
			},
			//取消卸车
			cancelUnload(){
				this.$refs.cancelUnloadDialog.open()
			},
			//确认取消卸车
			cancelUnloadDialogConfirm(){
				uni.showLoading({
					title: '正在取消卸车...',
				})
				cancelWaybillTruckLoading(1,this.formData.loadId).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '取消卸车成功',
							icon: 'none'
						})
						
						this.init()
						//this.$forceUpdate(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}
				})
			},
			//代收贷款
			agency(){
				
			},
			//上传回单
			uploadReceipt(){
				this.$refs.uploadReceiptDialog.open()
			},
			//确认上传回单
			uploadReceiptDialogConfirm(){
				//文件 (回单)
				if(this.formData.receiptAttachments===null)
				{
					uni.showToast({
						icon:'none',
						title:'请至少上传1份回单'
					})
					return
				}
				
				uni.showLoading({
					title: '正在上传...',
				})
				
				//上传回单
				uploadReceipt({
					waybillId:this.formData.waybillId,
					receiptAttachments:this.formData.receiptAttachments
				}).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '上传成功',
							icon: 'none'
						})
						this.$refs.uploadReceiptDialog.close()
						this.init()
						//this.$forceUpdate(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}	
				})
			},
			//完成运单
			completeWaybill(){
				this.$refs.completeWaybillDialog.open()
			},
			//确认完成运单
			completeWaybillDialogConfirm(){
				uni.showLoading({
					title: '完成运单...',
				})
				completeWaybill(this.formData.scheduleNo).then(res => {
					uni.hideLoading()
					if (res.code == '200') {
						uni.showToast({
							title: '此运单成功完成啦！',
							icon: 'success'
						})
						
						this.init()
						//this.$forceUpdate(); //重新加载数据
					} else {
						uni.showToast({
							icon: 'none',
							title: res.msg
						})
					}
				})
			},
			//退货
			salesReturn(){
				let that=this
				uni.showModal({
					title: '提示',
					content: '是否跳转退货运单页面填写退货详情？',
					success: function(res) {
						if (res.confirm) {
							uni.showLoading({
								title: '正在跳转...',
							})
							
							setTimeout(()=>{
								uni.navigateTo({
									url: '/pages-operation/operation/addReturnWaybill/addReturnWaybill?waybillId=' + that.waybillId
								})
							},1000)
						}
					}
				});
			},
			//复制
			copy(text) {
				uni.setClipboardData({
				 data: text,
					success: function(res) {
						uni.showToast({
				 		    title: '已复制',
							icon:'success'
						});
					}
				});
			}
			
		},
	}
</script>

<style scoped>
	.pagecontrol-top-scroll {
		height: 40px;
		width: 100%;
		white-space: nowrap;
		box-sizing: border-box;
		border-bottom: 1rpx solid #ededed;
		background-color: #f8f8f8;
		position: relative;
		z-index: 999;
	}

	.pagecontrol-top-title {

		height: 100%;
		width: 100%;
		display: flex;
		justify-content: space-around;
	}

	.pagecontrol-top-text {
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
	}

	.pagecontrol-top-normal {
		color: #656565;
		font-size: 16px;
	}

	.pagecontrol-top-selected {
		color: #000000;
		font-weight: bold;
		font-size: 16px;
	}

	.pagecontrol-bottom-line {
		width: 30vw;
		/* width: 16vw; */
		height: 3px;
		margin-top: 8px;
		background-color: #bf5f09;
		border-radius: 11px;
	}

	.pagecontrol-bottom-line-show {
		visibility: visible;
	}

	.pagecontrol-bottom-line-visibility {
		visibility: hidden;
	}

	.buttonHover {
		opacity: 0.6;
	}

	.active {
		border-radius: 8px;
		border: 1px solid #bf5f09;
		color: #bf5f09;
		padding: 4px 8px;
	}

	.contract::after {
		content: "";
		position: absolute;
		width: 0;
		height: 0;
		left: 190px;
		border-right: 3px solid transparent;
		border-bottom: 30px solid transparent;
		border-left: 16px solid #d9d9d9;
	}

	::v-deep .uni-border-left{
	    border-left-color: #f0f0f0;
	    border-left-style: solid;
	    border-left-width: 1px;
	    background-color: rgb(157,81,38);
	    border-radius: 0 0 11px 0;
	    /* color: white; */
	}
	::v-deep .uni-button-color{
	    color: #ffffff;
	}
	::v-deep .file-title{
	    font-size: 12px;
	    color: #333;
	}
	.copy{
		margin-left: 15px;
		color: #078cc5;
	}
	.copy:active{
		opacity: 0.6;
	}
</style>